<?php

namespace App\Http\Controllers;

use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
use Illuminate\Foundation\Bus\DispatchesJobs;
use Illuminate\Foundation\Validation\ValidatesRequests;
use Illuminate\Http\Request;
use Illuminate\Routing\Controller as BaseController;

class Controller extends BaseController
{
    use AuthorizesRequests, DispatchesJobs, ValidatesRequests;

    protected $userId = null;

    protected $requests = [];

    public function __construct(Request $request)
    {
        if (! empty($request->input('userId'))) {
            $this->userId = $request->input('userId');
        }
        $this->requests = toSnakeKey($request->all());
    }
}
